﻿<%@ Page Title="" Language="VB" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage(Of Dirección)" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%: ViewData("Titulo")%> - ASINDO
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="Registration" runat="server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">


    <h2><%: ViewData("Titulo")%></h2>

    <%-- The following line works around an ASP.NET compiler warning --%>
    <%: ""%>

    <% If Model.Id <> 0 Then
            Using Html.BeginForm("Borrar", "Dirección")%>
        <%: Html.HiddenFor(Function(model) model.Id)%>
        <input type="submit" value="Eliminar dirección" />
    <%      End Using
    End If%>

    <% Using Html.BeginForm() %>

        <%: Html.ValidationSummary(True) %>

        <fieldset>
            <legend>Campos</legend>

            <% Html.RenderPartial("~/Views/Direccion/FormDireccion.ascx", Model)%>
            
            <div class="editor-label"></div>
            <div class="editor-field"><input type="submit" value="Guardar" /></div>

        </fieldset>

    <% End Using %>

    <h3>Avisos</h3>
    <ul>
    <% For Each aviso In Model.Avisos%>
        <li><%: aviso.Completo%></li>
    <% Next%>
    </ul>

    <h3>Personas</h3>
    <ul>
    <% For Each pers In Model.Personas%>
        <li><%: pers.GetType.Name & " " & pers.NombreCompletoDerecho%></li>
    <% Next%>
    </ul>
    <div>
        <%: Html.ActionLink("Volver a la lista de direcciones", "Lista")%>
    </div>

</asp:Content>

